<template>
  <div class="left-chart-2">
    <div class="lc2-header">
      地块种植概况
    </div>
    <div>
      <el-form :model="queryParams" ref="queryRef" :inline="true" label-width="88px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="产区" prop="productAreaId">
              <el-select v-model="queryParams.productAreaId" placeholder="请选择产区" style="width: 120px">
                <el-option v-for="dict in product_area" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        <!-- </el-row>
        <el-row> -->
          <el-col :span="12">
            <el-form-item label="种植主体" prop="planterId">
              <el-select v-model="queryParams.planterId" placeholder="请选择种植主体" style="width: 120px">
                <el-option v-for="planter in planterList" :key="planter.planterId" :label="planter.planterName"
                  :value="planter.planterId"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>

    </div>
    <div class="lc2-details">
      定植日期:<span>{{ plantingDate }}</span>
    </div>
    <div class="lc2-details">
      定植天数:<span>{{ plantingDays }}天</span>
    </div>
    <div class="lc2-details">
      生育期:<span>{{ growingPeriod }}</span>
    </div>
    <div class="lc2-details">
      累积积温:<span>{{ cumulativeTempSum }}</span>GDD
    </div>
    <dv-decoration-2 style="height:10px;" />
  </div>
</template>

<script setup name="Grouth">
import { listPlanter } from "@/api/base/planter";

const { proxy } = getCurrentInstance();
const { product_area } = proxy.useDict('product_area');

const plantingDate = '2025年5月1日'
const plantingDays = '42'
const growingPeriod = '四穗花，一穗果'
const cumulativeTempSum = '18907'

const planterList = ref([])


const data = reactive({
  queryParams: {
    pageNum: 1,
    pageSize: 500,
    asId: null,
    productId: null,
    year: null,
  },
  rules: {
    productAreaId: [
      { required: true, message: "产区不能为空", trigger: "blur" }
    ],
    planterId: [
      { required: true, message: "种植主体不能为空", trigger: "blur" }
    ]
  }
});
const { queryParams, rules } = toRefs(data);

</script>

<style lang="scss" scoped>
.left-chart-2 {
  width: 100%;
  height: 30%;
  display: flex;
  flex-direction: column;

  .lc2-header {
    height: 35px;
    line-height: 35px;
    font-size: 16px;
    text-indent: 20px;
    margin-top: 10px;
  }

  .lc2-details {
    height: 40px;
    font-size: 14px;
    display: flex;
    align-items: center;
    text-indent: 20px;

    span {
      color: #096dd9;
      font-weight: bold;
      font-size: 16px;
      margin-left: 20px;
    }
  }

  .lc2-chart {
    height: 100%;
  }
}
</style>
